Prototype: Get ECID from kndctr cookie #1171
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Important
This is a prototype and should not be merged into the main branch. It is a proof of concept and is meant to spark discussion and, potentially, inform a more formal implementation. This PR should be closed once the prototype is no longer needed.
Description
Uses protobuf.js to decode the
kndctr_ORG_ID_identity
cookie and extract the ECID. Prototypes agetEcidFromCookie
command.Related Issue
Motivation and Context
We (recently) had a meeting with the Express team where they expressed their frustration that the
getIdentity
call to retrieve an ECID can take a while, and they use the ECID as an identity in a third-party analytics solution. We advised them to either extract the ECID from the AMCV cookie, or to use an FPID. But it is possible to extract the ECID from the cookie. The cookie is a url-safe, url-encoded, base64 encoded, byte representation of a protocol bufferUnfortnuately, protobuf.js adds significant bloat to the library. The minified version gains a whopping 15 KB in minzipped size for a total of 55.120 KB. This is a significant increase in size for a library that is already quite large.
Screenshots (if appropriate):
Types of changes
Checklist: